Image processing apparatus and image processing method and image capturing apparatus

ABSTRACT

An evaluation value for a pixel in an eye region in an image is computed, which is increased with increase in the redness of the pixel and with decrease in the luminance of the pixel. Furthermore, a color saturation value for the pixel included in the eye region is corrected with the use of a luminance value for a surrounding region around an eye and the evaluation value. In this case, the color saturation value is corrected such that the amount of correction is smaller in a case in which the luminance value is smaller even with the same evaluation value, thereby achieving improvement in the correction factor of and prevention of false corrections of a redeye region with a low color saturation and a low luminance.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing apparatus and animage processing method, and more particularly relates to an imageprocessing apparatus and an image processing method for correcting aredeye region included in an image captured by an image capturingapparatus.

The present invention further relates to an image capturing apparatusthat has the function of correcting a redeye region in a captured image.

2. Description of the Related Art

Conventionally, digital cameras have been known which capture opticalimages of subjects with the use of a photoelectric transducer and recordthe captured images as digital data on a recording medium typified by amemory card.

Furthermore, in a case in which a person is shot by flash photography(shot using a flash), a redeye effect is also known in which theperson's eyes are photographed as red eyes. The redeye effect is causedby sensed blood vessels of retina, and likely to be caused particular ina case in which flash photography is carried out with pupils dilated ina dark place or the like.

In order to reduce the incidence of such redeye effect, image capturingapparatuses are known which have a redeye reduction function of using alamp, a flash, or the like once immediately before flash photography(pre-emission) to constrict pupils and then carrying out flashphotography. However, in a case in which a subject fails to gaze at acamera during pre-emission, the image capturing apparatuses have aproblem in that the redeye reduction function is minimally effective.

While the redeye effect is caused in a similar way no matter whichcamera is used, a digital camera or a film camera, image processing canbe easily applied to captured images in the case of a digital camera.Therefore, redeye correction techniques have been proposed in which aredeye region is automatically or semi-automatically modified in a casein which it is determined that redeye effect is caused in a detectedface or detected eyes of a person included in the captured images.Japanese Patent Laid-Open No. 10-0233929 discloses detecting, as a faceregion, a region considered to have a flash color in a captured imageand detecting a redeye region in the detected face region. Furthermore,Japanese Patent Laid-Open No. 2001-309225 discloses, for a camera whichhas a redeye correction function, using an algorithm for comparisonbetween a detected geometric face model and face probability incombination with pattern matching to detect a face region in a capturedimage.

In the conventional art described above, a region as a candidate for aredeye region (a candidate redeye region) is detected with the degree ofredness of a pixel as an evaluation value, and further, a final redeyeregion is specified from the size, shape, and the like of the candidateredeye region to correct the pixels in the redeye region. Therefore,computing the degree of redness of the pixels accurately is a criticalfactor which determines proper correction of red eyes (in other words,prevention of false corrections of regions other than the redeyeregion).

For example, pupil portions in which redeye effect is caused often havedark colors such as black or brown. Therefore, particular in a case inwhich only a small amount of flash light enters pupils, the colorsaturation and luminance of a redeye region will be decreased.

In order to detect such a redeye region, for example, it is conceivableto use an evaluation value E computed by the use of the followingformula (1).

E=(2*R−G−B)/(2Y)  (1)

In the formula, R, G, and B respectively represent the values for red,green, and blue components of a pixel, and Y represents a luminancevalue.

This evaluation value E is obtained by normalizing the average value((R−G)+(R−B))/2 of color-difference signals R-G and R-B with the use ofa luminance signal Y. Since this evaluation value E increases as theluminance value decreases, it is believed that the evaluation value E iseffective for detection of redeye regions with their color saturationand luminance low.

However, in a case in which such an evaluation value E is used, theevaluation value for a region other than a redeye region, for example, aflesh region, is large in generally dark images such as underexposedimages or images shot with no flash light reaching a subject. Therefore,such a case has a problem that a redeye region is likely to be falselyrecognized, resulting in increase in the incidence of false correction.

The present invention has been made in consideration of these problemsof the conventional art, and has as its object to achieve improvement inthe correction factor of and prevention of false corrections of a redeyeregion with low color saturation and low luminance.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, there is provided animage processing apparatus comprising: detection unit that detects aneye in an image and detects a partial region including the detected eyeas an eye region; evaluation value computation unit that computes anevaluation value for pixels included in the eye region, the evaluationvalue increased with increase in the redness of a pixel and withdecrease in the luminance of a pixel; luminance computation unit thatcomputes a luminance value for a surrounding region around the eye inthe image; and correction unit that corrects a color saturation valuefor pixels included in the eye region with the use of the evaluationvalue and the luminance value, wherein the correction unit corrects thecolor saturation value for the pixels included in the eye region suchthat, in a case in which the luminance value is smaller than thepredetermined value even with the same evaluation value, the amount ofcorrection is smaller than that in the case of the luminance value equalto or more than a predetermined value.

According to another aspect of the present invention, there is providedan image capturing apparatus comprising the image processing apparatusaccording to the present invention, wherein the image processingapparatus applies image processing to a captured image.

According to a further aspect of the present invention, there isprovided an image processing method comprising: a detection step ofdetecting an eye in an image and detecting a partial region includingthe detected eye as an eye region; an evaluation value computation stepof computing an evaluation value for pixels included in the eye region,the evaluation value increased with increase in the redness of a pixeland with decrease in the luminance of a pixel; a luminance computationstep of computing a luminance value for a surrounding region around theeye in the image; and a correction step of correcting a color saturationvalue for pixels included in the eye region with the use of theevaluation value and the luminance value, wherein the correction stepcorrects the color saturation value for the pixel included in the eyeregion such that, in a case in which the luminance value is smaller thanthe predetermined value even with the same evaluation value, the amountof correction is smaller than that in the case of the luminance valueequal to or more than a predetermined value.

According to another aspect of the present invention, there is provideda computer-readable storage medium with a program recorded thereon formaking a computer function as each unit of the image processingapparatus according to the present invention.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a configuration example of an imagecapturing apparatus as an example of an image processing apparatusaccording to a first embodiment of the present invention;

FIG. 2 is a perspective view illustrating an example of the appearanceof the image capturing apparatus 100 which has the configuration in FIG.1;

FIG. 3 is a flow chart for explaining the overall flow of imagecapturing and recording processing in the image capturing apparatusaccording to the first embodiment of the present invention;

FIG. 4 is a diagram schematically illustrating internal processingconstituting redeye correction processing and a flow of signals in theimage capturing apparatus according to the first embodiment of thepresent invention;

FIG. 5 is a diagram illustrating an example of splitting an eye regionin the image capturing apparatus according to the first embodiment ofthe present invention;

FIG. 6 is a diagram illustrating an eye region with a redeye effectcaused and distribution examples for the variance computed by the imagecapturing apparatus according to the first embodiment;

FIG. 7 is a diagram illustrating a distribution example for themagnitude of a weighting factor determined by the image capturingapparatus according to the first embodiment of the present invention;

FIG. 8 is a diagram illustrating an example of an eye surrounding regionluminance Ye computed by the image capturing apparatus according to thefirst embodiment of the present invention;

FIG. 9 is a diagram illustrating an example of the relationship betweena luminance correction coefficient α and the eye surrounding regionluminance Ye in the first embodiment of the present invention;

FIG. 10 is a flow chart for explaining the overall flow of imagecapturing and recording processing in an image capturing apparatusaccording to a second embodiment of the present invention;

FIG. 11 is a diagram illustrating an example of the detection range foran eye region in the image capturing apparatus according to the secondembodiment of the present invention;

FIG. 12 is a diagram schematically illustrating internal processingconstituting redeye correction processing and a flow of signals in theimage capturing apparatus according to the second embodiment of thepresent invention;

FIG. 13 is a diagram illustrating an example of the relationship betweena luminance correction coefficient β and a face region average luminanceYf in the second embodiment of the present invention;

FIG. 14 is a flow chart for explaining the overall flow of imagecapturing and recording processing in an image capturing apparatusaccording to a third embodiment of the present invention;

FIG. 15 is a diagram schematically illustrating internal processingconstituting redeye correction processing and a flow of signals in theimage capturing apparatus according to the third embodiment of thepresent invention; and

FIG. 16 is a diagram illustrating an example of the relationship betweena reliability coefficient γ and a luminance difference ΔY in the thirdembodiment of the present invention.

DESCRIPTION OF THE EMBODIMENTS

Preferred embodiments of the present invention will now be described indetail in accordance with the accompanying drawings.

First Embodiment Configuration of Image Capturing Apparatus

FIG. 1 is a diagram illustrating a configuration example of an imagecapturing apparatus 100 as an example of an image processing apparatusaccording to an embodiment of the present invention.

Reference numeral 10 denotes a lens, reference numeral 12 a shutterwhich has an aperture function, reference numeral 14 denotes an imagesensor, such as a CCD or a CMOS sensor, for converting optical imagesinto electrical signals, and reference numeral 16 denotes an A/Dconverter for converting analog signal outputs from the image sensor 14into digital signals.

A timing generation unit 18 supplies clock signals and control signalsto the image sensor 14, the A/D converter 16, and a D/A converter 26,and is controlled by a memory control unit 22 and a system control unit50.

An image processing unit 20 applies predetermined pixel interpolationand color conversion processing to data from the A/D converter 16 ordata from the memory control unit 22.

Furthermore, in the image processing unit 20, captured image data isused to carry out predetermined computation processing. Then, based onthe obtained result of the computation processing, a system control unit50 controls an exposure control unit 40 and a metering control unit 42to achieve TTL (Trough The Lens) type AF (autofocus), AE (automaticexposure), and EF (flash pre-emission) functions.

Moreover, in the image processing unit 20, captured image data is usedto carry out predetermined computation processing, and based on theobtained result of the computation processing, TTL-type AWB (Auto WhiteBalance) processing is also carried out.

The memory control unit 22 controls the A/D converter 16, the timinggeneration unit 18, the image processing unit 20, an image displaymemory 24, the D/A converter 26, a memory 30, and acompression/expansion unit 32.

Output data from the A/D converter 16 is written into the image displaymemory 24 or the memory 30, via the image processing unit 20 and thememory control unit 22 or directly via the memory control unit 22.

The image data to be displayed, written into the image display memory24, is displayed on an image display unit 28 such as an LCD or anorganic EL display, via the D/A converter 26. When captured image datais sequentially displayed on the image display unit 28, an electronicviewfinder function can be achieved.

Furthermore, the image display unit 28 can optionally turn the displayON/OFF in response to a request from the system control unit 50, and thepower consumption of the image capturing apparatus 100 can be reduced ina case in which the display is turned OFF.

The memory 30 is a storage device for storing shot still images anddynamic images, and has a storage capacity sufficient to store apredetermined number of still images or dynamic images for apredetermined period of time. Therefore, also in the case of continuousshooting in which multiple dynamic images are continuously shot or ofpanoramic shooting, a large number of images can be written into thememory 30 at high speed.

In addition, the memory 30 can also be used as a work area for thesystem control unit 50.

The compression/expansion unit 32 loads the images stored in the memory30, applies a well-known data compression or expansion processing withthe use of adaptive discrete cosine transform (ADCT), wavelet transform,or the like, and writes the processed data in the memory 30.

The exposure control unit 40 controls the shutter 12 which has anaperture function, and also provides a flash dimming function incooperation with a flash 48.

The metering control unit 42 controls focusing of the lens 10, and azoom control unit 44 controls zooming of the lens 10. A barrier controlunit 46 controls operation of a lens barrier 102 for protecting the lens10.

The flash 48 functions as an auxiliary light source for shooting, andalso has dimming function. Furthermore, the flash 48 has a floodlightingfunction with AF fill light.

A redeye reduction lamp 49 is a light source for making pupils of ahuman as a subject smaller by emitting light for about 1 second beforeshooting with the flash 48. As described above, redeye effects can bereduced during flash photography by making the pupils smallerimmediately before shooting.

The exposure control unit 40 and the metering control unit 42 arecontrolled with the use of a TTL method, and based on the resultobtained by computation processing of captured image data carried out bythe image processing unit 20, the system control unit 50 exercisescontrol of the exposure control unit 40 and the metering control unit42.

The system control unit 50 is, for example, a CPU, which executes aprogram stored in a memory 52 to control the entire image capturingsystem 100. The memory 52 stores constants, variables, programs, and thelike for operation of the system control unit 50.

A display unit 54 is composed of, for example, a combination of a LCD ora LED with an output unit such as a speaker, and outputs operationalstates, messages, and the like with the use of characters, images,sounds, and the like, in response to execution of a program in thesystem control circuit 50. The display unit or display units 54 areplaced in the easily visible position(s) near an operation unit 70 ofthe image capturing apparatus 100. In addition, a portion of the displayunit 54 is placed in an optical viewfinder 104.

Information displayed on the display unit 54 includes self-timerdisplay; display of the number of shots remaining; shutter speeddisplay; aperture value display; exposure compensation display; flashdisplay; redeye reduction display; in-focus display; and display ofcamera shake warning. A portion of the information is displayed in theoptical view finder 104.

Furthermore, a portion of the information displayed on the display unit54 is displayed on a LED or the like.

In addition, of the information displayed on the display unit 54, forexample, a self-timer notification lamp is displayed with a lamp or thelike. This self-timer notification lamp may be shared with AF filllight.

A nonvolatile memory 56 is an electrically erasable and recordablememory, for which an EEPROM or the like is used, for example.

The following components are operation members for requesting the systemcontrol unit 50 to start or end predetermined operations: A mode dial60; a first shutter switch (SW1) 62; a second shutter switch (SW2) 64; aimage display ON/OFF switch 66; a flash setting button 68; and theoperation unit 70. These operation members are composed of buttons,switches, dials, touch panels, line-of-sight detectors, voicerecognizers or a combination thereof.

Now, these operation members will be specifically described.

The mode dial 60 is a switch for switching and setting variousfunctional modes such as power off; an automatic shooting mode; aprogram shooting mode; a panoramic shooting mode; a playback mode; amulti-screen playback/erase mode, and a PC connection mode.

The first shutter switch (SW1) 62 is turned ON with a first stroke (forexample, pressing halfway) of a shutter button (not shown) provided onthe image capturing apparatus 100. In a case in which the first shutterswitch (SW1) 62 is turned ON, AF (autofocus) processing, AE (automaticexposure) processing, AWB (Auto White Balance) processing, EFprocessing, or the like is initiated.

The second shutter switch (SW2) 64 is turned ON with a second stroke(for example, pressing fully) of the shutter button provided on theimage capturing apparatus 100, and instructs the initiation of a seriesof processes composed of exposure processing, development processing,and recoding processing. First, in the exposure processing, signals readout from the image sensor 14 are written in the memory 30 as image datavia the A/D converter 16 and the memory control circuit 22. Further,this image data is subjected to development processing using computationprocessing at the image processing unit 20 and the memory control unit22. Furthermore, the image data is read out from the memory 30 andcompressed in the compression/expansion unit 32, and recordingprocessing is then carried out for writing the image data in a recordingmedium 200 or 210.

The image display ON/OFF switch 66 is a switch for setting ON/OFF ofdisplay on the image display unit 28. When the optical viewfinder 104 isused to carry out shooting, for example, power saving can be achieved byturning OFF the display on the image display unit 28 composed of TFTs, aLCD, etc. to stop current supply.

The flash setting button 68 is a button for setting and changingoperation modes of the flash. The modes which can be set in the presentembodiment include an automatic mode, a normally emitting mode, a redeyereduction automatic mode, and a normally emitting (redeye reduction)mode. The automatic mode refers to a mode in which flash isautomatically emitted for shooting depending on the brightness of thesubject. The normally emitting mode refers to a mode in which flash isalways emitted for shooting. The redeye reduction automatic mode refersto a mode in which flash is automatically emitted for shooting dependingon the brightness of the subject while the redeye reduction lamp isalways lighted when flash is emitted. The normally emitting (redeyereduction) mode refers to a mode in which light from the redeyereduction lamp and stroboscopic light are always emitted for shooting.

The operation unit 70 is composed of various buttons, touch panels,etc., which includes, for example, a menu button; a set button; a menudisplacement button, a shooting image quality selection button; anexposure compensation button; and a compression mode switch.

The compression mode switch is a switch for selecting the compressionrate of JPEG (Joint Photographic Expert Group) compression or selectinga RAW mode, in which signals from the image sensor are directlydigitalized and recorded on a recording medium.

In the present embodiment, for example, a normal mode and a fine modeare prepared as the mode for the JPEG compression. The user of the imagecapturing apparatus 100 can select for shooting, either the normal modein a case in which emphasis is placed on the data size of shot images,or the fine mode in a case in which emphasis is placed on the imagequality of shot images.

In the mode for the JPEG compression, the compression/expansion unit 32reads out image data written in the memory 30, compresses the image datato a predetermined compression rate, and then records the compressedimage data, for example, on the recording medium 200.

In the RAW mode, depending on the pixel array for a color filter of theimage sensor 14, image data is directly read out for each line, imagedata written in the memory 30 is read out via the A/D converter 16 andthe memory control unit 22, and the image data is recorded on therecording medium 200.

A power supply control unit 80 is composed of a battery detection unit,a DC-DC converter, a switch unit for switching a block to which power isto be distributed, and the like. The power supply control unit 80detects the presence or absence of a battery installed, the type ofbattery, the remaining battery capacity, controls the DC-DC converterbased on the result of the detection and on instructions from the systemcontrol circuit 50, and supplies required voltages to a range of unitsincluding the recording medium for a required period of time.

A power supply 86 is composed of a primary battery such as an alkalinebattery or a lithium battery, a secondary battery such as a NiCdbattery, a NiMH battery or a Li battery, an AC adapter, or the like, andis mounted on the image capturing apparatus 100 with connectors 82 and84.

The recording media 200 and 210 such as a memory card or a hard diskinclude recording units 202 and 212 composed of semiconductor memories,magnetic disks, or the like, interfaces 204 and 214 with the imagecapturing apparatus 100, and connectors 206 and 216. The recording media200 and 210 are mounted on the image capturing apparatus 100 via theconnectors 206 and 216 on the medium side and connectors 92 and 96 onthe image capturing apparatus 100 side. Interfaces 90 and 94 areconnected to the connectors 92 and 96. The presence or absence of therecording media 200 and 210 installed is detected by a detachablerecording medium detection unit 98.

It is to be noted that the present embodiment has been described withthe assumption that the image capturing apparatus 100 has two systems ofinterfaces and connectors for mounting the recording media. However, anynumber of interfaces and connectors, including a single interface and asingle connector, may be provided for mounting the recording media. Inaddition, differently standardized interfaces and connectors may be usedfor each system.

Image data and management information accompanying the image data can bemutually transferred to and from other peripherals such as computers andprinters by connecting a variety of communication cards to theconnectors 92 and 96.

The lens barrier 102 covers the image capturing unit of the imagecapturing apparatus 100, including the lens 10, to prevent the imagecapturing unit from being contaminated or broken.

The optical viewfinder 104 is, for example, a TTL viewfinder, whichforms an image of light rays passing through the lens 10 with the use ofa prism or a mirror. The use of the optical viewfinder 104 allowsshooting to be carried out without the use of the electronic viewfinderfunction of the image display unit 28. In addition, as described above,information on a portion of the functions of the display unit 54, forexample, focus display, camera shake warning, and the like, is displayedin the optical view finder 104.

A communication unit 110 carries out communication processing based onvarious standards, e.g., radio communication such as RS232C, USB,IEEE1394, P1284, SCSI, modems, LAN, IEEE802.11x.

A connector (an antenna in the case of radio communication) 112 connectsthe image capturing apparatus 100 to other devices via the communicationunit 110.

FIG. 2 is a perspective view illustrating an example of the appearanceof the image capturing apparatus 100 which has the configuration in FIG.1, where the same structures as those shown in FIG. 1 are denoted by thesame reference numerals.

A power supply button 201 is a button for turning the image capturingapparatus 100 on or off. A MENU button 205 is a button for displaying amenu screen which is used for changing shooting parameters or camerasettings, or for stopping the display of the menu screen. A SET button203 is used for determining set values or for determining menu items. Anerase button 207 is used for requesting erase of captured images. A DISPbutton 208 is a button for switching combinatorial information to bedisplayed on the image display unit 28. A cross button 209 is composedof left, right, top, and bottom buttons, which is used for transition ofmenu screens or displacement of selected items, or for switching ofdisplayed images in a playback mode. These buttons are included in theoperation unit 70.

(Image Capturing and Recording Processing)

FIG. 3 is a flow chart for explaining the overall flow of imagecapturing and recording processing in the image capturing apparatusaccording to the present embodiment.

In the present embodiment, it will be assumed that redeye correctionprocessing is carried out at the time of capturing images, and correctedimages are saved on the recording medium. However, needless to say,redeye correction processing can be carried out even at the time ofplaying back the images saved on the recording medium, rather than atthe time of shooting.

When the shutter button is fully pressed to turn SW2 ON, shootingprocessing is carried out (S302). Subject images converted into analogelectrical signals by the image sensor 14 are converted into digitalsignals by the A/D converter 16. Then, the digital signals output by theA/D converter 16 are subjected to shot image processing in the imageprocessing unit 20 (S303).

Although details are omitted here, this shot image processing involvesprocessing for converting signals read out from the image sensor 14 intopixel-by-pixel image data represented by a luminance component Y and acolor difference component UV, on the basis of, for example, thearrangement of color filters.

Next, the image processing unit 20 uses the image data to carry out eyeregion detection processing for detecting a partial region (eye region)including a region considered as the eyes of a human in the capturedimage (S304).

The eye region detection processing may be carried out by any approach.However, for example, pattern matching with a geometric model asdescribed in Japanese Patent Laid-Open No. 2001-309225 can be used tocarry out the eye region detection processing.

When the eye region is detected by the eye region detection processing,the image processing unit 20 carries out redeye correction processing.Specifically, the evaluation value indicating the redness of each pixelin the eye region detected by the eye region detection processing andthe luminance value of a surrounding region around the eyes are firstcomputed (S305). Then, the redeye correction processing for correctingthe values for the pixels included in the detected eye region is appliedwith the use of the evaluation value and the luminance value (S306).

The image processing unit 20 outputs the image data subjected to theredeye correction processing to the memory 30 through the memory controlunit 22. The memory control unit 22 writes the image data from the imageprocessing unit 20 into the image display memory 24 in accordance withthe resolution of the image display unit 28, thereby resulting in thecorrected image being displayed on the image display unit 28 (quickreview operation) (S307). On the other hand, the image data written inthe memory 30 is encoded by the compression/expansion unit 32, forexample, into a JPEG format. Then, the encoded image data is recorded onthe recording medium 200 or 210, for example, in accordance with the DCFstandard, in response to control exercised by the system control unit 50(S308).

It is to be noted that in a case in which no eye region is detected inS304, the processing of computing the evaluation value and the luminancevalue in S305 and the redeye correction processing in S306 are skipped,and uncorrected images are displayed and recorded in S307 and S308.

(Redeye Correction Processing)

Next, the redeye correction processing carried out by the imageprocessing unit 20 in S306 of FIG. 3 will be described in detail.

FIG. 4 is a diagram schematically illustrating internal processingconstituting the redeye correction processing and a flow of signals inthe image capturing apparatus according to the present embodiment. Thefunctions of each processing unit in FIG. 4 are implemented by the imageprocessing unit 20, for example, as software.

As described above, the image processing unit 20 detects an eye regionin S304 of FIG. 3. Then, the image processing unit 20 supplies pixeldata 401 (in Yuv format) contained in the eye region to an evaluationvalue computation processing unit 402, where the eye region has arectangular shape with the number W of pixels in horizontal width andthe number H of pixels in vertical width.

The evaluation value computation processing unit 402 uses the followingformulas to perform conversion into a RGB format and compute anevaluation value E, for each pixel for pixel data 401.

E=(2*R−G−B)/(2Y)  (1)

R=Y+1.402*V  (2)

G=Y−0.344*U−0.714*V  (3)

B=Y+1.772*U  (4)

As is clear from the formula (I), the redder the pixel (the stronger theredness is) and the smaller the luminance, the more the evaluation valueE is increased. The evaluation value computation processing unit 402outputs the computed evaluation value E to a block splitting andvariance computation processing unit 403 and a correction coefficientcomputation processing unit 406.

The block splitting and variance computation processing unit 403 as asplitting unit and a measure computation unit splits the eye region intomultiple regions (blocks), and computes the variance D of the evaluationvalue E for the pixels included in the individual blocks. The blocks areset to a size such that a redeye region (that is, a pupil region) isincluded within one block. The specific size of the block can be set byany method, and can be set in advance, for example, in consideration ofthe statistical size of a redeye region. Alternatively, the size of theeye region can be determined in consideration of the size of the block.

In the present embodiment, it will be assumed that, as shown in FIG. 5,an eye region 500 is split into 25 blocks in total, 5 blocks in thehorizontal direction and 5 blocks in the vertical direction, and thevariance D of the evaluation values E for each block is computed. Thevariance D is computed with the use of the following formulas (5) and(6).

$\begin{matrix}{{Ave} = {\sum\limits_{I = 1}^{N}{{E(I)}/N}}} & (5) \\{D = {\sum\limits_{I = 1}^{N}{\left( {\left( {{E(I)} - {Ave}} \right) \times \left( {{E(I)} - {Ave}} \right)} \right)/N}}} & (6)\end{matrix}$

In the formulas, E(I) represents individual evaluation values, and Nrepresents the number of pixels included in the block.

The block splitting and variance computation processing unit 403 outputsthe computed variance D for each block to an enlargement resizeprocessing unit 404.

The enlargement resize processing unit 404 carries out enlargementresize by, for example, linear interpolation of the 25 (5×5) variants Dcomputed for each block into W (horizontal width W)×H (vertical width H)pieces of data. The variance dada resized to W×H pieces of data isoutput to a maximum-value coordinates detection processing unit 405 anda correction coefficient computation processing unit 406.

The maximum-value coordinates detection processing unit 405 as aposition detecting unit detects the pixel position (MaxX, MaxY) of thedata with the maximum value from the variance data subjected toenlargement resize. Then, the maximum-value coordinates detectionprocessing unit 405 outputs the detected pixel position to thecorrection coefficient computation processing unit 406.

An eye surrounding region luminance computation processing unit 408computes an eye surrounding region luminance Ye as an example of theluminance value of a surrounding region around the eye in the image.Specifically, the eye surrounding region luminance computationprocessing unit 408 computes, as shown in FIG. 8, an average luminancefor a lower portion of the detected eye region as the eye surroundingregion luminance Ye. More specifically, in the present embodiment, theeye surrounding region luminance computation processing unit 408computes the average value for a line of luminance of the base of theeye region as eye surrounding region luminance. The thus computed eyesurrounding region luminance Ye is output to the correction coefficientcomputation processing unit 406. The eye surrounding region luminancecomputation processing unit 408 uses a lower portion of the detected eyeregion because it is believed that there is a possibility that an upperportion of the eye region includes eyebrows whereas right and leftportions thereof include hair, and that the most stable value can beobtained from the lower portion of the eye region.

The correction coefficient computation processing unit 406 computes acorrection coefficient from the eye surrounding region luminance Ye, thevariance data resized to W×H pieces of data, and the pixel position(MaxX, MaxY) of the variance data with the maximum value. Thecalculation of the correction coefficient will be described in detailbelow.

FIG. 6 is a diagram illustrating an eye region with a redeye effectcaused and distribution examples for the variance.

In FIG. 6, reference numeral 601 denotes a variance distribution in theX axis at Y=MaxY, where the horizontal axis indicates an x coordinatewhereas the vertical axis indicates the magnitude of the variance.Further, reference numeral 602 denotes a variance distribution in the Yaxis at X=MaxX, where the horizontal axis indicates a y coordinatewhereas the vertical axis indicates the magnitude of the variance.

The correction coefficient computation processing unit 406 determines aweighting factor in accordance with the distance from the pixel position(MaxX, MaxY) detected by the maximum-value coordinates detectionprocessing unit 405. Specifically, as shown in FIG. 7, the closer to thepixel position (MaxX, MaxY), the larger the weighting factor determined.

Reference numeral 603 in FIG. 6 denotes a weighting factor distributionin the X axis at Y=MaxY, where the horizontal axis indicates an xcoordinate whereas the vertical axis indicates the magnitude of theweighting factor. Further, reference numeral 604 denotes a weightingfactor distribution in the Y axis at X=MaxX, where the horizontal axisindicates a y coordinate whereas the vertical axis indicates themagnitude of the weighting factor. In the example shown in FIG. 6, theweighting factor is determined so as to linearly decrease in proportionto the distance from the pixel position (MaxX, MaxY).

Furthermore, the correction coefficient computation processing unit 406computes a luminance correction coefficient α from the eye surroundingregion luminance Ye. The luminance correction coefficient α takes amaximum value of 1, and is set in such a way that the lower the eyesurrounding region luminance Ye, the smaller the luminance correctioncoefficient α is, or the higher the eye surrounding region luminance Ye,the larger the luminance correction coefficient α is. FIG. 9 is adiagram illustrating an example of the relationship between theluminance correction coefficient α and the eye surrounding regionluminance Ye in the present embodiment. As shown in FIG. 9, theluminance correction coefficient α has a minimum value set to 0.2 in thepresent embodiment. The correction coefficient computation processingunit 406 can store in advance, for example, a table showing therelationship in FIG. 9, and compute the luminance correction coefficientα corresponding to the value of the eye surrounding region luminance Ye.In a case in which the value of the eye surrounding region luminance Yeis smaller than a predetermined value, the luminance correctioncoefficient α may be a coefficient which renders the value smaller thanin the case of the predetermined value or more.

Then, the correction coefficient computation processing unit 406computes a correction coefficient C(x, y) in accordance with thefollowing formula (7) with the use of the evaluation value E (x, y) fromthe evaluation value computation processing unit 402, the data D(x, y)obtained by enlargement resize processing of the variance, the weightingfactor W (x, y) and the luminance correction coefficient α.

C(x,y)=E(x,y)×D(x,y)×W(x,y)×α.  (7)

In the formula (7), (x, y) denotes coordinates in the eye region, and is1≦x≦W and 1≦y≦H in this example. In addition, 0≦c(x, y)≦1 is employed.

As described above, the correction coefficient C is increased withincrease in the evaluation value E, with increase in the variance D, orwith increase in the weighting factor W. Furthermore, in a case in whichthe eye surrounding region luminance Ye is smaller, the correctioncoefficient C is corrected so as to be smaller.

The correction coefficient C computed in the correction coefficientcomputation processing unit 406 is output to a correction processingunit 407. The correction processing unit 407 executes redeye correctionprocessing by applying the correction coefficient C to the pixel data401 for the eye region. Specifically, on the assumption that theluminance component of the pixel data 401 in the Yuv format isrepresented by Y(x, y), the color components thereof are represented byU(x, y) and V(x, y), and the color components of the corrected pixeldata are represented by U′ (x, y) and V′ (x, y), the correctionprocessing unit 407 corrects the color saturation of the pixel data inaccordance with the following formulas (8) and (9).

U′(x,y)=U(x,y)×(1−C(x,y))  (8)

V′(x,y)=V(x,y)×(1−C(x,y))  (9)

The smaller the correction coefficient C, that is, the smaller theevaluation value E, the variance D, the weighting factor W, or the eyesurrounding region luminance Ye, the smaller the amount of correctionfor the color components U and V, resulting in a smaller differencebetween the color components U and V and the color components U′ and V′.

The correction processing unit 407 uses the corrected pixel data 409 tooverwrite the corresponding the eye region data in the captured imagedata.

When the processing described above is executed for all of the other eyeregions, the redeye correction processing is completed.

While each eye region is split into 5×5 blocks in the presentembodiment, the number of blocks is not limited to 5×5. Each eye regionmay be more compartmentalized, such as 9×9, or the numbers of blocks inthe horizontal direction and vertical direction can be set to differentvalues from each other, such as 9×7. Furthermore, the numbers of blocksmay be varied depending on the accuracy of the detection algorithm foreye regions. For example, in the case of using a detection method bywhich the positions of pupils can be detected with a high degree ofaccuracy, the reduction in processing time can be achieved by setting arelatively small eye region for a region which is considered to includeeyes to reduce the number of blocks. Alternatively, even in the case ofthe same detection algorithm for eye regions, eye regions can be set tohave a smaller size with higher reliability for the detection result ofan obtained eye region.

Furthermore, in the present embodiment, the redness of the pixelsincluded in a redeye region is reduced by more substantially reducingthe color components of the pixel data with increase in the correctioncoefficient in the correction processing unit 407. However, for example,it is also possible to set corrected target color components Ut and Vtand make corrections in accordance with the following formulas.

U′(x,y)=U(x,y)×(1−C(x,y))+Ut×C(x,y)  (10)

V′(x,y)=V(x,y)×(1−C(x,y))+Vt×C(x,y)  (11)

Furthermore, the variance for the evaluation value E is used as anexample of a measure of the degree of variation for the evaluation valueE in the present embodiment. However, any value, including standarddeviations, can be used instead which is available as a measure of thedegree of variation for the evaluation value E with respect to thepixels included in a block.

Furthermore, while the image capturing apparatus has been described asan example of the image processing apparatus in the present embodiment,the present invention is applicable to any apparatus, including printersand information processing apparatuses, which is available for read eyecorrection processing.

As described above, according to the present embodiment, the correctionaccuracy for redeye regions with their color saturation and luminancelow can be improved by using the evaluation value normalized with theluminance as an evaluation value indicative of the degree of redness ofthe pixels. Further, in a case in which the eye surrounding regionluminance is low, false corrections in not only redeye regions but alsoimages with dark surroundings (for example, images with underexposure)can be prevented by using in combination a luminance correctioncoefficient for reducing the decrease in color components due tocorrection.

In the present embodiment, the configuration has been described in whichthe evaluation value E normalized with the luminance is corrected withthe degree of variation for the evaluation value E. However, theadvantageous effect of the prevention of false corrections in generallydark images in the case of using the evaluation value E normalized withthe luminance can be achieved by only the introduction of the correctioncoefficient α in accordance with the eye surrounding region luminanceYe. In other words, the process of correcting the evaluation value Edepending on the degree of variation for the evaluation value E is notindispensable in the present invention.

Furthermore, even in a case in which the evaluation value E is correctedin accordance with the degree of variation for the evaluation value E,weighting in accordance with the distance from the pixel position withthe maximum degree of variation is not indispensable.

However, taking the variation of the evaluation value into considerationor carrying out weighting has an advantageous effect of being able toprevent false corrections due to other factors.

For example, in FIG. 5, the pixels in an eye corner region 501 that is abloodshot portion of the eye have a large evaluation value E because thepixels are heavily tinged with red, while the evaluation value E has asmall degree of variation with respect to a block 502 including theportion. Therefore, the evaluation value with respect to the eye cornerregion 501 is reduced due to the small degree of variation, resulting ina small correction coefficient. Further, for a relatively large areacomposed of pixels of about the same color, such as a flesh region 503,the evaluation value in a block also has a smaller degree of variation,thus resulting in a small correction coefficient.

More specifically, the magnitude of the evaluation value E is modifieddepending on the degree of variation for the evaluation value E computedfor the block including those pixels, and computed with the correctioncoefficient, thereby allowing the amount of correction for red pixels ina region which is small in the degree of variation, such as an eyeregion or a flesh region, to be prevented from increasing.

Furthermore, the correction coefficient for the eye corner region 501 orthe flesh region 503 is further decreased by modifying the evaluationvalue also with weighting (a weighting coefficient) which is decreasedwith increase in the distance from the coordinates (pixel position) withthe maximum degree of variation. In addition, gradual variation of theweighting makes a boundary division between a corrected region and anuncorrected region less noticeable, allowing artificiality to bereduced.

On the contrary, since the degree of variation for the evaluation valueis larger in a block including a redeye region and an iris region aroundthe redeye region, a correction coefficient is obtained for carrying outa sufficient amount of correction, so that effective correction can beachieved. Furthermore, if the coordinates with the maximum degree ofvariation is regarded as the center of the redeye region to carry outweighting such that the correction coefficient is decreased withincrease in the distance from the coordinates, the amount of correctionis increased for the redeye region whereas the amount of correction isdecreased for the surrounding iris region. Therefore, false correctionscan be prevented more effectively.

Second Embodiment

Next, a second embodiment of the present invention will be describedmainly with reference to respects different from the first embodiment.The present embodiment is characterized in that the average luminance ofa face region is used as another example of the luminance value of asurrounding region around an eye in an image.

(Image Capturing and Recording Processing)

FIG. 10 is a flow chart for explaining the overall flow of imagecapturing and recording processing in the image capturing apparatusaccording to the present embodiment. In FIG. 10, the same processingsteps as those in the first embodiment are denoted by the same referencenumerals as those in FIG. 3, and description of the same processingsteps will be thus omitted.

Also in the present embodiment, it will be assumed that redeyecorrection processing is carried out at the time of capturing images,and corrected images are saved on the recording medium. However,needless to say, redeye correction processing can be executed at anytime rather than at the time of shooting.

Following the shot image processing in S303, the image processing unit20 uses the image data to carry out face detection processing fordetecting a region (face region) considered as a face in the capturedimage (S1004).

The face detection processing may be carried out by any approach.However, for example, in the same way as in the first embodiment,pattern matching with a geometric face model as described in JapanesePatent Laid-Open No, 2001-309225 can be used to carry out the facedetection processing. Furthermore, it is possible to compute the degreeof face reliability as a measure of how much the face region correspondsto a face, on the basis of degree of coincidence (the degree ofsimilarity) between the model and the image region in the patternmatching.

In the present embodiment, it will be assumed that the image processingunit 20 computes 10-level degrees of face reliability, 1 to 10. Thedegree of reliability 1 refers to the highest degree of coincidence inpattern matching, which is most likely to indicate a face, whereas thedegree of reliability 10 refers to the lowest degree of coincidence inpattern matching, which is least likely to indicate a face.

Furthermore, the image processing unit 20 also computes the size of thedetected face region (the face size). In the present embodiment, it willbe assumed that the image processing unit 20 computes, as the face size,larger one of the maximum numbers of pixels in the horizontal directionand vertical direction of the face region.

It will be assumed that the image processing unit 20 uses, as a finallydetected face region, a face region which has a degree of reliability ofthreshold FR set in advance (3 in the present embodiment) or less andhas a face size of threshold FS (200 in the present embodiment) or more,among detected face regions.

When the face region is detected by the face detection processing, theimage processing unit 20 computes an average luminance value Yf for thedetected face region as the luminance value of a surrounding regionaround an eye in the image (S1005).

Furthermore, the image processing unit 20 detects an eye region from thedetected face region (S304). In the present embodiment, the imageprocessing unit 20 detects as an eye region, as shown in FIG. 11, alocation set in advance on the basis of the detected face region.

Then, the image processing unit 20 computes the evaluation valueindicating the redness of each pixel in the detected eye region and theluminance value of a surrounding region around the eye (S305). Then,redeye correction processing is applied to the detected eye region withthe use of the evaluation value and the luminance value (S306). Thepresent embodiment differs from the first embodiment in that correctionsare made depending on the value of the face region average luminance Yfas the coefficient for use in the redeye correction processing, ratherthan the value of the eye surrounding region luminance Ye. Thisdifference will be described later.

Since the subsequent processing is similar to that in the firstembodiment, description of the subsequent processing will be omitted.

It is to be noted that in a case in which no face region is detected inS304 in the present embodiment, the evaluation value/luminancecomputation processing in S305 and the redeye correction processing inS306 are skipped, and uncorrected images are displayed and recorded inS307 and S308.

(Redeye Correction Processing)

Next, the evaluation value/luminance computation processing carried outby the image processing unit 20 in S305 of FIG. 10 will be described indetail.

FIG. 12 is a diagram schematically illustrating internal processingconstituting redeye correction processing and a flow of signals in theimage capturing apparatus according to the present embodiment. Thefunctions of each processing unit in FIG. 12 are implemented by theimage processing unit 20, for example, as software. In addition, in FIG.12, the same components as those in the first embodiment are denoted bythe same reference numerals as those in FIG. 4, and repeated descriptionof the same components will be thus omitted.

As described above, the present embodiment differs from the firstembodiment in that the present embodiment has no eye surrounding regionluminance computation processing unit 408, and that the correctioncoefficient computation processing unit 406 corrects the correctioncoefficient with the use of a luminance correction coefficient β on thebasis of the face region average luminance Yf computed in S1005, insteadof the eye surrounding region luminance Ye.

The luminance correction coefficient β takes the maximum value of 1 asin the luminance correction coefficient β in the first embodiment, andis set to decrease with decrease in the face region average luminance Yfor to increase with increase in the face region average luminance Yf.FIG. 13 is a diagram illustrating an example of the relationship betweena luminance correction coefficient β and a face region average luminanceYf in the present embodiment. As shown in FIG. 13, the minimum value ofthe luminance correction coefficient β is set to 0.2 in the presentembodiment. The correction coefficient computation processing unit 406can, for example, store in advance a table which shows the relationshipin FIG. 13, and compute the luminance correction coefficient βcorresponding to the value of the face region average luminance Yf. In acase in which the face region average luminance Yf has a smaller valuethan a predetermined value, the luminance correction coefficient β maybe a coefficient which renders the value smaller than in the case of thepredetermined value or more.

Then, the correction coefficient computation processing unit 406computes a correction coefficient C(x, y) in accordance with thefollowing formula (12) with the use of the evaluation value E (x, y)from the evaluation value computation processing unit 402, the data D(x,y) obtained by enlargement resize processing of the variance, theweighting factor W (x, y) and the luminance correction coefficient β.

C(x,y)=E(x,y)×D(x,y)×W(x,y)×β  (12)

In the formula (12), (x, y) denotes coordinates in the eye region, andis 1≦x≦W and 1≦y≦H in this example. In addition, 0≦c(x, y)≦1 isemployed.

As described above, the correction coefficient C is increased withincrease in the evaluation value E, with increase in the variance D, orwith increase in the weighting factor W. Furthermore, in a case in whichthe eye region average luminance Yf is smaller, the correctioncoefficient C is corrected so as to be smaller.

As described above, in the present embodiment, the face detectionprocessing is carried out, and the face region average luminance Yf isused, instead of the eye surrounding region luminance Ye, as a measurefor determining whether or not the face region is a generally darkimage.

The second embodiment can also achieves the same advantages as thoseachieved by the first embodiment.

Third Embodiment

Next, a third embodiment of the present invention will be describedmainly with reference to respects different from the first and secondembodiments.

FIG. 14 is a flow chart for explaining the overall flow of imagecapturing and recording processing in an image capturing apparatusaccording to the present embodiment. In FIG. 14, the same processingsteps as those in the first or second embodiment are denoted by the samereference numerals as those in FIGS. 3 and 10, and description of thesame processing steps will be thus omitted.

Also, in the present embodiment, it will be assumed that redeyecorrection processing is carried out at the time of capturing images,and corrected images are saved on the recording medium. However,needless to say, redeye correction processing can be executed at anytime rather than at the time of shooting.

Further, FIG. 15 is a diagram schematically illustrating internalprocessing constituting redeye correction processing and a flow ofsignals in the image capturing apparatus according to the presentembodiment. The functions of each processing unit in FIG. 15 areimplemented by the image processing unit 20, for example, as software.In addition, in FIG. 15, the same components as those in the first orsecond embodiment are denoted by the same reference numerals as those inFIGS. 4 and 12, and repeated description of the same components will bethus omitted.

The present invention is a combination of the first and secondembodiments, and characterized in that both a face region averageluminance Yf as a first luminance value and an eye surrounding regionluminance Ye as a second luminance value are computed and that thecorrection coefficient computation processing unit 406 corrects acorrection coefficient on the basis of these both luminance values.

Specifically, in the present embodiment, the correction coefficientcomputation processing unit 406 first computes a luminance correctioncoefficient α from the value of the eye surrounding region luminance Yein the same as in the first embodiment. Alternatively, a luminancecorrection coefficient β may be computed from the value of the faceregion average luminance Yf in the same as in the second embodiment.

Next, the correction coefficient computation processing unit 406computes the absolute value ΔY of the difference between the eyesurrounding region luminance Ye and the face region average luminance Yfwith the use of the following formula.

ΔY=|Ye−Yf|  (13)

Further, the correction coefficient computation processing unit 406computes a reliability coefficient γ in accordance with the ΔY. Thereliability coefficient γ takes the maximum value of 1 as in theluminance correction coefficients α and β, and is set to increase withdecrease in the luminance difference ΔY or to decrease with increase inthe luminance difference ΔY.

In a normal state, the absolute value ΔY of the difference between theeye surrounding region luminance Ye and the face region averageluminance Yf is small. Therefore, if the luminance difference ΔY issmall, a correction coefficient is computed as described in the firstand second embodiments. On the other hand, in a case in which theluminance difference ΔY is large, which indicates the possibility thatthe eye region has been falsely detected, false corrections areprevented in such a way that the correction coefficient is decreasedwith increase in the luminance difference ΔY.

FIG. 16 is a diagram illustrating an example of the relationship betweena reliability coefficient γ and a luminance difference ΔY in the presentembodiment. The correction coefficient computation processing unit 406can, for example, store in advance a table which shows the relationshipin FIG. 16, and compute the reliability coefficient γ corresponding tothe value of the luminance difference ΔY.

Then, the correction coefficient computation processing unit 406computes a correction coefficient C(x, y) with the use of the luminancecorrection coefficient α or β and the reliability coefficient γ asfollows.

C(x,y)=E(x,y)×D(x,y)×W(x,y)×α×γ  (14)

or

C(x,y)=E(x,y)×D(x,y)×W(x,y)×β×γ  (15)

Since the subsequent correction processing is similar to that in thefirst embodiment, description of the subsequent processing will beomitted.

The configuration has been described in the present embodiment, wherethe reliability coefficient γ with the relationship as shown in FIG. 16is computed from the absolute value ΔY of the difference between the eyesurrounding region luminance Ye and the face region average luminance Yfto correct the correction coefficient. However, for example, the presentembodiment may be implemented on the assumption of γ=0 (no correctionsmade) if the absolute value ΔY of the difference is a predeterminedvalue or more, or γ=1 (corrections made) if the absolute value ΔY of thedifference is the predetermined value or less.

As described above, according to the present embodiment, in addition tothe advantageous effects of the first or second embodiment, falsecorrections can be prevented with a high degree of accuracy because thecorrection coefficient is computed in view of the reliability ofdetection of the eye region by employing the difference between thevalue of the eye surrounding region luminance Ye and the face regionaverage luminance Yf.

Other Embodiments

The embodiments described above can also be implemented as software by asystem or an apparatus computer (or CPU, MPU or the like).

Therefore, a computer program supplied to a computer in order toimplement the embodiments described above by such computer itself alsoimplements the present invention. That is, a computer program forimplementing the functions of the embodiments described above is itselfwithin the scope of the present invention.

It should be noted that a computer program for implementing theembodiments described above may be in any form provided that it iscomputer-readable. Such a program may be executed in any form, such asan object code, a program executed by an interpreter, or script datasupplied to an OS, but is not limited thereto.

Examples of storage media that can be used for supplying the program aremagnetic storage media such as a floppy disk, a hard disk, or magnetictape, optical/magneto-optical storage media such as an MO, a CD-ROM, aCD-R, a CD-RW, a DVD-ROM, a DVD-R, or a DVD-RW, and a non-volatilesemiconductor memory or the like.

As for the method of supplying the program using wire/wirelesscommunications, there is, for example, a method in which a data file(program data file), either a computer program itself that forms theinvention or a file or the like that is compressed and automaticallyinstalled, and capable of becoming the computer program that comprisesthe invention on a client computer, is stored on a server on a computernetwork. The program data file may be in an executable format, or it maybe in the form of source code.

Then, the program data file is supplied by downloading to a connectedclient computer accessing the server. In this case, the program datafile may also be divided into a plurality of segment files and thesegment files distributed among different servers.

In other words, a server device that provides program data files forimplementing the functional processes of the present invention bycomputer to one or more client computers is also covered by the claimsof the present invention.

It is also possible to encrypt and store the program of the presentinvention on a storage medium, distribute the storage medium to users,allow users who meet certain requirements to download decryption keydata from a website via the Internet, and allow these users to decryptthe encrypted program by using the key data, whereby the program isinstalled in the user computer.

In addition, the computer program for implementing the embodimentsdescribed above may utilize the functions of an OS running on thecomputer.

Further, the computer program for achieving the embodiments describedabove may have part composed of firmware such as an expansion boardintegrated on a computer, or may be executed by a CPU provided on anexpansion board or the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2008-008167, filed on Jan. 17, 2008, which is hereby incorporated byreference herein its entirety.

1. An image processing apparatus comprising: detection unit that detectsan eye in an image and detects a partial region including the detectedeye as an eye region; evaluation value computation unit that computes anevaluation value for pixels included in the eye region, the evaluationvalue increased with increase in the redness of a pixel and withdecrease in the luminance of a pixel; luminance computation unit thatcomputes a luminance value for a surrounding region around the eye inthe image; and correction unit that corrects a color saturation valuefor pixels included in the eye region with the use of the evaluationvalue and the luminance value, wherein the correction unit corrects thecolor saturation value for the pixels included in the eye region suchthat, in a case in which the luminance value is smaller than thepredetermined value even with the same evaluation value, the amount ofcorrection is smaller than that in the case of the luminance value equalto or more than a predetermined value.
 2. The image processing apparatusaccording to claim 1, wherein the luminance computation unit computes,as the luminance value, an average luminance value of pixels in thesurrounding region around the eye in the eye region.
 3. The imageprocessing apparatus according to claim 1, further comprising facedetection unit that detects a face region in the image, wherein theluminance computation unit computes, as the luminance value, an averageluminance value of pixels in the face region including the eye region.4. The image processing apparatus according to claim 1, furthercomprising face detection unit that detects a face region in the image,wherein the luminance computation unit computes, as a first luminancevalue, an average luminance value of pixels in the surrounding regionaround the eye in the eye region, and computes as a second luminancevalue, an average luminance value of pixels in the face region includingthe eye region, and wherein the correction unit corrects the colorsaturation value for the pixels included in the eye region such that, ina case in which the luminance value is smaller than the predeterminedvalue even with the same evaluation value, the amount of correction issmaller than that in the case of predetermined one of the firstluminance value and the second luminance value equal to or more than apredetermined value, and also corrects the color saturation value forthe pixels included in the eye region such that, in a case in which thedifference between the first luminance value and the second luminancevalue is larger than the predetermined value, the amount of correctionis smaller than that in the case of the difference between the firstluminance value and the second luminance value being equal to or lessthan a predetermined value.
 5. The image processing apparatus accordingto claim 1, further comprising measure computation unit that computes ameasure indicative of a degree of variation for the evaluation value foreach of multiple blocks constituting the eye region, wherein thecorrection unit corrects the color saturation value for the pixelsincluded in the eye region such that the amount of correction is smallerfor pixels included in a block with the degree of variation smaller. 6.An image capturing apparatus comprising the image processing apparatusaccording to claim 1, wherein the image processing apparatus appliesimage processing to a captured image.
 7. An image processing methodcomprising: a detection step of detecting an eye in an image anddetecting a partial region including the detected eye as an eye region;an evaluation value computation step of computing an evaluation valuefor pixels included in the eye region, the evaluation value increasedwith increase in the redness of a pixel and with decrease in theluminance of a pixel; a luminance computation step of computing aluminance value for a surrounding region around the eye in the image;and a correction step of correcting a color saturation value for pixelsincluded in the eye region with the use of the evaluation value and theluminance value, wherein the correction step corrects the colorsaturation value for the pixel included in the eye region such that, ina case in which the luminance value is smaller than the predeterminedvalue even with the same evaluation value, the amount of correction issmaller than that in the case of the luminance value equal to or morethan a predetermined value.
 8. A computer-readable storage medium with aprogram recorded thereon for making a computer function as each unit ofthe image processing apparatus according to claim 1.